package com.dianban.service.impl;


import com.dianban.dao.UserEnergyLogDao;
import com.dianban.entity.UserEnergyLog;
import com.dianban.service.UserEnergyLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;

/**
 * 用户业务实现层
 *
 * Created by bysocket on 07/02/2017.
 */
@Service
@Transactional(readOnly = true)
public class UserEnergyLogServiceImpl implements UserEnergyLogService {

    @Autowired
    private UserEnergyLogDao userEnergyLogDao;

    @Override
    @Transactional(readOnly = false)
    public int insert(UserEnergyLog userEnergyLog) {
        userEnergyLog.setCreatetime(System.currentTimeMillis()/1000);
        return userEnergyLogDao.insert(userEnergyLog);
    }


}
